#ifndef DYNAMICHEADER_H__
#define DYNAMICHEADER_H__

#include "../framework/interfaces.h"
#include "../framework/Compositor.h"

#include <list>
#include <bitset>
using namespace std;

class IHeaderSegment : public ISerializable
{
	
};

/*
	IHeaderSegment
	IField
	ILinkedFields
	CDynamicHeader

	I need an object,
	there are specific policies that govern the object.
	policies are set in run time.
	policies are not changed in run time.
	policies can have different interface.

	Operations Policy:
		bool ReadOnly. 
		bool AssignlabeOnly.
		bool Cyclic.
		int Range (low -> High).
		

	Serialize Policy:
		int SizeRestriction.
		enum SizeModifier (bit,byte,word,dword,qword).

		
*/

class IField : public IHeaderSegment
{
public:
	IField();
	virtual ~IField();

private:

};

class CDynamicHeader : public IHeaderSegment , 
	public virtual ABCCompositor_1Ret0Arg<string,ISerializable,CREATE_FUNCTION_POINTER(ISerializable,Serialize),_traits<string,CRetModAgg<string>>>/*, //&className::functionName
						public virtual ABCCompositor_0Ret1ArgRef<const string,ISerializable,CREATE_FUNCTION_POINTER(ISerializable,DeSerialize)>*/
{
public:
	CDynamicHeader();
	~CDynamicHeader();

	string Serialize()
	{
		return ABCCompositor_1Ret0Arg::IterateThrough();
	}

	void DeSerialize(string const & val)
	{
		//ABCCompositor_0Ret1ArgRef::IterateThrough(val);
	}
	
};

class IHeaderSegment2 : public ITSerializable<bitset<8>>
{
	
};

//class CDynamicHeader2 : public IHeaderSegment2 , 
//	public virtual ABCCompositor_1Ret0Arg<string,ISerializable,CREATE_FUNCTION_POINTER(ISerializable,Serialize),_traits<string,CRetModAgg<string>>>/*, //&className::functionName
//						public virtual ABCCompositor_0Ret1ArgRef<const string,ISerializable,CREATE_FUNCTION_POINTER(ISerializable,DeSerialize)>*/
//{
//public:
//	CDynamicHeader();
//	~CDynamicHeader();
//
//	string Serialize()
//	{
//		return ABCCompositor_1Ret0Arg::IterateThrough();
//	}
//
//	void DeSerialize(string const & val)
//	{
//		//ABCCompositor_0Ret1ArgRef::IterateThrough(val);
//	}
//	
//};

#endif